package com.lmh.friend.controller.user;

import com.lmh.common.core.domain.R;
import com.lmh.common.core.domain.TableDataInfo;
import com.lmh.common.core.domain.dto.PageQueryDTO;
import com.lmh.friend.service.user.IUserMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user/message")
@RestController
public class UserMessageController {
    @Autowired
    private IUserMessageService userMessageService;

    @GetMapping("/list")
    public TableDataInfo list(PageQueryDTO dto) {
        return userMessageService.list(dto);
    }

    @DeleteMapping("/delete")
    public R<Void> delete(Long textId) {
        return userMessageService.delete(textId);
    }
}
